import request from '@/utils/request'

// 查询流程列表
export function listFlow(query) {
  return request({
    url: '/allocation/flow/list',
    method: 'get',
    params: query
  })
}

// 查询流程详细
export function getFlow(id) {
  return request({
    url: '/allocation/flow/' + id,
    method: 'get'
  })
}

// 新增流程
export function addFlow(data) {
  return request({
    url: '/allocation/flow',
    method: 'post',
    data: data
  })
}

// 修改流程
export function updateFlow(data) {
  return request({
    url: '/allocation/flow',
    method: 'put',
    data: data
  })
}

// 删除流程
export function delFlow(id) {
  return request({
    url: '/allocation/flow/' + id,
    method: 'delete'
  })
}
// 消息状态修改
export function changeNoticeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/allocation/flow/changeStatus',
    method: 'put',
    data: data
  })
}
